package com.wwj.server.model;

import net.sf.json.JSONObject;

public class Message {

    /**
     * 数据
     */
    private byte[] data;

    public Message() {
    }

    public Message(byte[] data) {
        this.data = data;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public String getType(){
        JSONObject jsonObj = JSONObject.fromObject(new String(getData()));
        return jsonObj.getString("type");
    }

}
